package persentation.presentUniversityDean;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

import vo.userVO.StudentVO;
import java.awt.Font;

public class InfoPanel extends JPanel {

	private StudentVO studentVO;
	private static Image INFO = new ImageIcon("Graphics/universityDean/info.png").getImage();

	public InfoPanel(StudentVO studentVO) {
		setSize(600, 643);
		setLayout(null);
		this.studentVO = studentVO;

		JLabel label = new JLabel("所属院系");
		label.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label.setBounds(204, 72, 111, 27);
		add(label);

		JLabel label_1 = new JLabel(studentVO.getDepartmentId());
		label_1.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_1.setBounds(421, 72, 121, 23);
		add(label_1);

		JLabel label_2 = new JLabel("学号");
		label_2.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_2.setBounds(204, 124, 95, 23);
		add(label_2);

		JLabel lblNewLabel = new JLabel(studentVO.getId());
		lblNewLabel.setFont(new Font("微软雅黑", Font.BOLD, 18));
		lblNewLabel.setBounds(421, 124, 121, 21);
		add(lblNewLabel);

		JLabel label_4 = new JLabel(studentVO.getName());
		label_4.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_4.setBounds(421, 172, 121, 23);
		add(label_4);

		JLabel lblNewLabel_1 = new JLabel(String.valueOf(studentVO.getGrade()));
		lblNewLabel_1.setFont(new Font("微软雅黑", Font.BOLD, 18));
		lblNewLabel_1.setBounds(421, 237, 121, 15);
		add(lblNewLabel_1);

		/*JLabel label_6 = new JLabel("GPA");
		label_6.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_6.setBounds(204, 287, 95, 24);
		add(label_6);

	
		JLabel label_7 = new JLabel(String.valueOf(studentVO.getGPA(1)));
		label_7.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_7.setBounds(421, 286, 121, 27);
		add(label_7);*/

		/*JLabel label_8 = new JLabel("学分绩");
		label_8.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_8.setBounds(204, 343, 95, 26);
		add(label_8);

		JLabel lblNewLabel_2 = new JLabel(String.valueOf(studentVO.getGPA()));
		lblNewLabel_2.setFont(new Font("微软雅黑", Font.BOLD, 18));
		lblNewLabel_2.setBounds(421, 351, 121, 15);
		add(lblNewLabel_2);*/

		JLabel label_9 = new JLabel("准入准出信息");
		label_9.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_9.setBounds(204, 340, 111, 27);
		add(label_9);

		JLabel lblNewLabel_3 = new JLabel(String.valueOf(studentVO
				.getInOutInfo()));
		lblNewLabel_3.setFont(new Font("微软雅黑", Font.BOLD, 18));
		lblNewLabel_3.setBounds(421, 340, 121, 27);
		add(lblNewLabel_3);

		JLabel label_10 = new JLabel("学生姓名");
		label_10.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_10.setBounds(204, 172, 95, 27);
		add(label_10);

		JLabel label_3 = new JLabel("年级");
		label_3.setFont(new Font("微软雅黑", Font.BOLD, 18));
		label_3.setBounds(204, 229, 95, 27);
		add(label_3);

	}

	public void paintComponent(Graphics g) {
		g.drawImage(INFO, 0, 0, null);
	}
}
